package com.mall.business.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mall.business.domain.OrderMergeDTO;
import com.mall.business.domain.TCoupon;
import com.mall.business.domain.TOrder;
import com.mall.business.domain.TProduct;

/**
 * 订单Service接口
 *
 * @author ruoyi
 * @date 2025-03-30
 */
public interface ITOrderService  extends IService<TOrder>
{
    /**
     * 查询订单
     *
     * @param id 订单主键
     * @return 订单
     */
    public TOrder selectTOrderById(String id);

    /**
     * 查询订单列表
     *
     * @param tOrder 订单
     * @return 订单集合
     */
    public List<TOrder> selectTOrderList(TOrder tOrder);

    public List<TOrder> selectTOrderListApp(TOrder tOrder);

    /**
     * 新增订单
     *
     * @param tOrder 订单
     * @return 结果
     */
    public int insertTOrder(TOrder tOrder);

    /**
     * 修改订单
     *
     * @param tOrder 订单
     * @return 结果
     */
    public int updateTOrder(TOrder tOrder);

    /**
     * 批量删除订单
     *
     * @param ids 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteTOrderByIds(String[] ids);

    /**
     * 删除订单信息
     *
     * @param id 订单主键
     * @return 结果
     */
    public int deleteTOrderById(String id);


    public  String  createOrder( OrderMergeDTO mergerOrder, String remark, Map<String, TProduct> skuStocksMap);
    // 用户参与秒杀
    public TProduct userSkill(String seckillId);

    public TOrder getOrderByOrderNo(String  orderNo);

    public BigDecimal getOrderPayMoney(String  userId);

    public   void  couponValidate(TCoupon coupon);

}
